{extend name="$_tpl_public_layout_ace"/}


{block name="breadcrumb"}
<ul class="breadcrumb">
	<li><i class="fa fa-home home-icon"></i><a href="{:url('manage/index/index')}">{:config('web_site_title')}</a></li>
	<li><a href="{:url('seatsel/manage/index')}">{:config('proj_name')}</a></li>
	<li><a href="{:url('seatsel_manage/product/index')}">演出管理</a></li>
	<li><a href="{:url('seatsel_manage/spec/index', ['pid'=>$pid])}">{$sideName}</a></li>
</ul>
{/block}


{block name="pageheader"}
<h1>
	{$sideName}
</h1>
{/block}


{block name="content"}
<link rel="stylesheet" href="/tplnew/seatsel/css/jquery.seat-charts.css">
<link rel="stylesheet" href="/tplnew/seatsel/css/manage-seat.css">

<div class="callout callout-warning">
	<h3 class="header smaller lighter green">演出名称</h3>
	<div class="mb10">{$productInfo['name']}</div>
	<div class="mb10"><b>{$specInfo['name']}</b></div>
	<div class="callout callout-danger">红色文字说明已售</div>
</div>

<div class="row">
	<div class="col-md-6">
		<div class="widget-box">
			<div class="widget-header">
				<h4 class="widget-title lighter smaller">
					<i class="ace-icon fa fa-rss orange"></i>设置座位类型的价格
				</h4>
			</div>
			<div class="widget-body">
				<div class="widget-main">
					<div class="set-type-div mb10 cc">
						<form method="post" action="{:url('seatsel_manage/spec/savePriceSetting')}" class="form-horizontal J_ajaxForm">
							<input type="hidden" name="specId" value="{$specId}" />
							<table class="table">
								<thead>
									<tr>
										<th>名称</th>
										<th>样式</th>
										<th width="80">价格</th>
									</tr>
								</thead>
								{volist name="regionSettingArr" id="vo"}
									<?php
										//$regionId = $key + 1;
									?>
									<tr>
										<td>{$vo['name']}</td>
										<td>{$region_class_config[$vo['class_id']]['name']}</td>
										<td><input type="input" name="prices[{$key}]" value="{$regionPriceSettingArr[$key]['price']}" class="input-sm form-control" /></td>
									</tr>
								{/volist}
							</table>
							<button type="submit" class="btn btn-primary btn-sm J_ajaxSubmit" data-isloadding="2">设置价格</button>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="col-md-6">
		<div class="widget-box">
			<div class="widget-header">
				<h4 class="widget-title lighter smaller">
					<i class="ace-icon fa fa-rss orange"></i>设置座位状态
				</h4>
			</div>
			<div class="widget-body">
				<div class="widget-main">
					<div class="set-type-div mb10 cc">
						<label class="radio-inline"><input type="radio" name="seat-status" value="1" />待售</label>
						<label class="radio-inline"><input type="radio" name="seat-status" value="3" />预留</label>
					</div>
					<input class="btn btn-primary btn-sm" type="button" onclick="mark_seats()" value="设置座位类型" />
				</div>
			</div>
		</div>
		<div class="widget-box">
			<div class="widget-header">
				<h4 class="widget-title lighter smaller">
					<i class="ace-icon fa fa-rss orange"></i>功能区
				</h4>
			</div>
			<div class="widget-body">
				<div class="widget-main">
					<a href="{:url('seatsel_manage/spec/calSaleNum', ['specId'=>$specId])}" class="J_layerPcDialog" data-tip="检测各区已售和剩余的票数">检测各区已售和剩余的票数</a>
				</div>
			</div>
		</div>
	</div>
</div>

<div class="clearfix"></div>

<div class="front-indicator">屏幕</div>

<div id="seat-map"></div>

<div class="tac mt10 hide">
	<button type="button" class="btn btn-primary btn-sm saveSeats">保存修改</button>
</div>
{/block}


{block name="script"}
<script type="text/javascript" src="/tplnew/seatsel/js/jquery.seat-charts.js"></script>
<script type="text/javascript">
var url_saveSeatsStatus = "{:url('seatsel_manage/spec/saveSpecSeatsStatus')}"; //设置一批座位的状态
var pid = {$pid};
var specId = {$specId};
var initRows = {$specInfo['rows']};
var initCols = {$specInfo['cols']};
var initSeatMap = {$initSeatMap};
var priceList = {$priceList};
var productSeatList = {$productSeatList}; //座位列表数据
//var coordinateJson = {$coordinateJson}; //已经单独设置的坐标
</script>
<script type="text/javascript" src="/tplnew/seatsel/js/spec-seatbook.js"></script>
{/block}